import { getReq, postReq } from '@U/common'
import { getToken } from '@U/Auth'

// 获取素材列表
export const getMaterialList = (params = {}) => getReq('/api/channel-agent/material/list', params)
// 获取素材分组列表
export const getMaterialGroupList = (params = {}) => getReq('/api/channel-agent/material/material-group/list', params)
// 获取各个类别素材列表
export const getMaterialTypeList = (params = {}) => getReq('/api/channel-agent/material/material-type/list', params)
// 获取素材详情
export const getMaterialDetails = (params = {}) => getReq(getToken() ? '/api/channel-agent/material/info' : '/api/common/material/info', params)
// 获取素材表单列表
export const getMaterialFormList = (params = {}) => getReq('/api/channel-agent/material/material-form/list', params)
// 增加下载数
export const addDownloadingCount = (params = {}) => postReq('/api/common/material/add-downloading-count', params)
